Update to keyboard-types 0.8.3; migrate to NamedKey across platforms#214
Conversation
|
I built this on macOS, but I don't use I have a family of crates |
RustAudio#214 from branch 'update-keyboard-events' of github.com:waywardmonkeys/baseview
|
FYI, I am working on making the UI framework floem support baseview, as described here. It would be helpful if this could be integrated, as it is very helpful for compatibility, and it would be more likely for the patches to be accepted if they don't require my fork of baseview. |
|
Looks like there's one remaining place that needs to be updated in the X11 backend ( |
928f89b to
be7ab2e
Compare
- Replace deprecated `Key::<Variant>` usages with `Key::Named(NamedKey::<Variant>)` - Map unidentified and dead keys to `Key::Named(NamedKey::Unidentified)` and `Key::Named(NamedKey::Dead)` - Keep `Key::Character(String)` for printable characters - Update platform keymaps (macOS, X11, Windows) to 0.8 API keyboard-types 0.8 moved non-character keys into `NamedKey`. This adapts the platform mappings to the new API, aligning emitted `KeyboardEvent.key` with the spec-compliant representation.
be7ab2e to
0c0c44f
Compare
|
I made the few mentioned fixes, as well as fixing it for our MSRV. It's all good now, thank you very much for your PR! 🙂 |
Key::<Variant>usages withKey::Named(NamedKey::<Variant>)Key::Named(NamedKey::Unidentified)andKey::Named(NamedKey::Dead)Key::Character(String)for printable characterskeyboard-types 0.8 moved non-character keys into
NamedKey. This adapts the platform mappings to the new API, aligning emittedKeyboardEvent.keywith the spec-compliant representation.